﻿CREATE proc sp_suatscd
@MaTSCD int,
@TenTSCD nvarchar(200),
@DVT nvarchar(100),
@ng_thuc_gs int,
@SoTK char,
@MaDV char
as
declare @dem as int
select @dem=count(*) from DanhMucTSCD where MaTSCD=@MaTSCD
if(@dem>0)
	begin
	Update DanhMucTSCD
	set TenTSCD=@TenTSCD,DVT=@DVT,ng_thuc_gs=@ng_thuc_gs,SoTK=@SoTK,MaDV=@MaDV
	where MaTSCD=@MaTSCD
	select ErrCode=1
	end
else
	begin
	Select ErrCode=0
	end	